package ink.xiaobaibai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import ink.xiaobaibai.bo.ClientOrderHaveCodeBo;
import ink.xiaobaibai.entity.ClientOrder;
import ink.xiaobaibai.vo.ClientOrderVo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-21
 */
public interface IClientOrderService extends IService<ClientOrder> {

    /**
     * 根据用户id查询用户的订单
     */
    public List<ClientOrderVo> getClientListByUserId(Integer userId, Integer pageNum, Integer pageSize);

    /**
     * 获取至今本机器单次支付的营业额
     */
    public BigDecimal sumOrderAmount(Integer deviceId);

    /**
     * 查询一台机器的订单
     */
    public List<ClientOrder> getOrderListByDeviceId(Integer deviceId, Integer pageNum, Integer pageSize);

    /**
     * 根据机器id和时间段查询一台机器的订单
     * 返回的订单对象带有机器码
     */
    public List<ClientOrderHaveCodeBo> getOrderBoListByDeviceId(Integer deviceId, Date startTime, Date endTime);

    /**
     * 根据负责人id和时间段去查询一台机器的订单
     */
    public List<ClientOrderHaveCodeBo> getOrderBoListByAdminUserId(Integer userId, Date startTime, Date endTime);

    /**
     * 根据部门id和时间段去查询一台机器的订单
     */
    public List<ClientOrderHaveCodeBo> getOrderBoListByDepId(Integer depId, Date startTime, Date endTime);

}
